package no.rmz.chez.game.moveSelection;

import java.util.Collection;



public final class LastSelector<T> extends Selector<T> {
    /**
     * Return the final element in the collection.
     * @param possiblities The possible return values.
     * @return The last element.
     */
    @Override
    public T selectFrom(final Collection<T> possiblities) {
        T result = null;
        for (T e:  possiblities) {
            result = e;
        }
        return result;
    }
}

